import request from '@/utils/request'

export default {
  getVideoList(chapterId) {
    return request({
      url: `/eduservice/video/videolist/${chapterId}`,
      method: 'get'
    })
  },
  getVideoInfo(videoId) {
    return request({
      url: `/eduservice/video/getVideoInfo/${videoId}`,
      method: 'get'
    })
  },
  saveVideo(video) {
    return request({
      url: `/eduservice/video/addVideo`,
      method: 'post',
      data: video
    })
  },
  updateVideo(video) {
    return request({
      url: `/eduservice/video/updateVideo`,
      method: 'post',
      data: video
    })
  },
  deleteVideo(videoId) {
    return request({
      url: `/eduservice/video/deleteVideo/${videoId}`,
      method: 'delete'
    })
  }
}
